{extend name="base" /}

{block name="title"}权限管理{/block}

{block name="main"}
	<div class="content-wrapper">
		<section class="content-header">
			<h1>权限管理 <small>英雄联盟</small></h1>
			<ol class="breadcrumb">
				<li><a href="/shuashuale"><i class="fa fa-home"></i> 首页</a></li>
				<li><a href="/shuashuale/authorization"> 权限管理</a></li>
				<li class="active">权限管理添加</li>
			</ol>
		</section>

		<section class="content">
			<div class="box">
				<div class="box-header with-border">
					<h3 class="box-title">添加权限管理</h3>
				</div>

				<form class="form-horizontal" method="post">
					<div class="box-body">
						<div class="form-group">
							<label class="col-sm-2 control-label">名称</label>
							<div class="col-sm-10">
								<input type="text" class="form-control" name="role_name">
								<span class="help-block">必须输入英文或拼音,空格用'_'(下划线)代替.如: Accounting_assistant</span>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label">描述</label>
							<div class="col-sm-10">
								<input type="text" class="form-control" name="description">
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label">授权目录</label>
							<div class="col-sm-10">
								{volist name='resources' id='resource'}
									<div class="checkbox">
										<label>{$resource['description']}</label>
									</div>
									<div class="checkbox">
										<i class="fa fa-fw">|-</i>
										{volist name='resource.actions' id='action'}
											<label><input type="checkbox" name="resources[{$resource['resource_controller_id']}][{$action['resource_action_id']}]" value="1">{$action['description']}</label>
										{/volist}
									</div>
									<hr class="no-margin"/>
								{/volist}
							</div>
						</div>
					</div>

					<div class="box-footer clearfix">
						<button type="submit" class="btn btn-success center-block">添加权限</button>
					</div>
				</form>
			</div>
		</section>
	</div>
{/block}